/**
 * 返回顶部
 */
var scrollToTopBox = document.getElementById('scrollToTop');
//返回按钮tap
scrollToTopBox.addEventListener('tap', function(e) {
    e.stopPropagation();
   	mui('#pullrefresh').scroll().scrollTo(0, 0, 500);
   	scrollToTopBox.classList.add('hide');
});

document.getElementById("scroll-main").addEventListener('scroll', function(e) {
	var classList = event.target.classList;
	var offset = e.detail.y;
	if(classList.contains('mui-slider-group') || classList.contains('filterbody')) {
		return false;
	} else {
		if(-offset > 300) {
			scrollToTopBox.classList.remove('hide');
		} else {
			scrollToTopBox.classList.add('hide');
		}
	}
})